<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<meta charset="UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title>Insert title here</title>
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="css/edittable.css"></link>
<link rel="stylesheet" type="text/css" href="css/validate.css"></link>
<script type="text/javascript" src="js/jquery-1.8.0.js"></script>
<script type="text/javascript">
$(function() {
	$("#submit").click(function () {
		$.ajax({
			 url:"RoleServlet.do",
			 type:"POST",
			 data:{flag:"update",id:'${role.id}',roleName:$("#roleName").val(),des:$("#des").val()},
			 success:function(data){
				 $("#result_msg").html(data);
			 } 
		 }); 
	});
})
</script>
</head>
<body>
	<div class="div_title">
		<div class="div_titlename">
			<img src="images/san_jiao.gif"><span>角色修改</span>
		</div>
		</div>
	<table class="edit_table">
		<tr>
			<td class="td_info">角色名称:</td>
			<td class="td_input_short"><input type="text" class="txtbox"
				id="roleName" value="${role.roleName}" name="roleName" /></td>
			<td><label class="validate_info" id="roleName_msg">2-15位非空白字符</label>
			</td>
		</tr>
		<tr>
			<td class="td_info">角色描述:</td>
			<td><textarea rows="4" cols="27" name="des" class="txtarea"
					id="des">${role.des}</textarea></td>
			<td><label></label></td>
		</tr>
		<tr>
			<td class="td_info"></td>
			<td><input class="form_btn" type="button" value="修改" id="submit" />
				<input type="button" onclick="self.location=document.referrer;"
				class="form_btn" value="返回" /></td>
			<td><label id="result_msg" class="result_msg"></label></td>
		</tr>
	</table>
</body>
</html>